Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor limayaml.Save and store.SaveYAML → limayaml.Marshal #2726

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

jandubois
Copy link
Member

store.SaveYAML was the only caller of limayaml.Save, and was only called from main.validateAction.

The name Save implies writing to a file, so Marshal seems like a more logical choice for the name. And since it is marshalling limayaml structs it should be in the limayaml package and not in store.

Also move limayaml.unmarshalYAML from load.go to marshal.go for consistency.


I was wondering if load.go and marshal.go should be combined into a single file, but kept them separate for now.

I also feel like store.LoadYAMLByFilePath should probably belong in the limayaml package, but am not sure.

`store.SaveYAML` was the only caller of `limayaml.Save`, and was only called
from `main.validateAction`.

The name `Save` implies writing to a file, so `Marshal` seems like a more
logical choice for the name. And since it is marshalling `limayaml` structs
it should be in the `limayaml` package and not in `store`.

Also move `limayaml.unmarshalYAML` from `load.go` to `marshal.go` for consistency.

Signed-off-by: Jan Dubois <[email protected]>
@jandubois jandubois requested a review from a team October 11, 2024 18:25
@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 11, 2024
@AkihiroSuda AkihiroSuda added the kind/refactoring Refactoring label Oct 11, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 11eb750 into lima-vm:master Oct 13, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants